using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using G4KFramework.Objects;
using G4KFramework.Inputs;
using Microsoft.Xna.Framework.Graphics;
using Microsoft.Xna.Framework;

namespace G4K.Objects
{
    class GObjectBasic : GGuiComponent
    {
        //---------------------------------------------------------------
        // Fields
        protected Texture2D _texture = null;
        protected GObjectView _objectView = null;

        public GObjectView objectView
        {
            get { return _objectView; }
            set { _objectView = value; }
        }

        //---------------------------------------------------------------
        // Properties
        public Texture2D texture
        {
            get { return _texture; }
            set { _texture = value; }
        }

        public GObjectBasic(GGameInput input, SpriteBatch spriteBatch) : base(input)
        {
            _objectView = new GObjectView(spriteBatch);
        }

        //---------------------------------------------------------------
        // Draw
        public void Draw()
        {
            if (_texture != null)
                _objectView.Draw(_texture);
        }
        public void Draw(Texture2D texture)
        {
            _objectView.Draw(texture);
        }
    }
}
